17 Naming Conventions
See
Tips and Conventions in GNU Emacs Lisp Reference
Manual, for a description of Emacs Lisp programming
conventions. These conventions help ensure that Emacs packages
work nicely one another, so an EIEIO-based program should
follow them. Here are some conventions that apply specifically to
EIEIO-based programs:
- Come up with a package prefix that is relatively short.
Prefix all classes, and methods with your prefix. This is a
standard convention for functions and variables in Emacs.
- Do not prefix method names with the class name. All methods
in EIEIO are “virtual”, and are dynamically
dispatched. Anyone can override your methods at any time. Your
methods should be prefixed with your package name.
- Do not prefix slots in your class. The slots are always
locally scoped to your class, and need no prefixing.
- If your library inherits from other libraries of classes,
you must “require” that library with the
require command.